import requests
import datetime
import hashlib

Salt="test"
def sha256hex(data):
    sha256 = hashlib.sha256(bytes(Salt,encoding='utf8'))
    sha256.update(data.encode('utf-8'))
    res = sha256.hexdigest()
    print("sha256加密结果:", res)
    return res


now_time = datetime.datetime.now().strftime("%Y%m%d%H%M%SZ")
eccodedata='testuser2sd4TeSk20150917160500Z'
encodekey=sha256hex(eccodedata)
headers = {'content-type': "application/json", 'appuser ': 'testuser','timestamp':now_time,'randomcode ':"2sd4TeSk"}
url = "https://authtest.rfchina.com:38080/siam/"
data = {}
res = requests.post(url=url,data=data,headers=headers)







